package com.zmm.util.convert;

import org.springframework.lang.Nullable;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * list 工具类
 * @author 900045
 * @description:
 * @name ListUtil
 * @date By 2021-07-05 17:00:08
 */
public class ListUtil {


	/**
	 * 初始化数组列表
	 * @author: 900045
	 * @date: 2021-07-05 17:00:23
	 * @throws 
	
	 * @return: java.util.List<E>
	 **/
	public static <E> List<E> arrayList() {
		return new ArrayList<E>();
	}


	/**
	 * 初始化数组列表
	 * @author: 900045
	 * @date: 2021-07-05 17:00:39
	 * @throws 
	 * @param initialCapacity: 初始大小
	 * @return: java.util.List<E>
	 **/
	public static <E> List<E> arrayList(int initialCapacity) {
		return new ArrayList<E>(initialCapacity);
	}


	/**
	 * 判断数组是否为空
	 * @author: 900045
	 * @date: 2021-07-05 17:00:54
	 * @throws 
	 * @param collection: 
	 * @return: boolean
	 **/
	public static boolean isEmpty(@Nullable Collection<?> collection) {
		return (collection == null || collection.isEmpty());
	}
}
